import axios from 'axios'

let service = axios.create({
    baseURL: '/sc-goods/',
    timeout: 1000 * 10,
    responseType: 'json',
    withCredentials: false,
    headers: {
        "Content-Type": "application/json;charset=utf-8"
    }
})

// 添加请求拦截器
service.interceptors.request.use(config => {
    return config;
}, error => {
    return Promise.reject(error);
})

// 添加响应拦截器
service.interceptors.response.use(response => {
    return response;
}, error => {
    return Promise.reject(error);
})

export default service